const gps = {
	state: {
		latitude: '',
		longitude: '',
		markers: [], // 标记点
		polyline: [], // 记录轨迹点
		totalDistance:0 , //总里程
		locationWatcherId: null, // 步骤生成的监听器id
	},

	mutations: {
		setLatitude: (state, newData) => {
			state.latitude = newData
		},
		setLongitude: (state, newData) => {
			state.longitude = newData
		},
		setMarkers: (state, newData) => {
			state.markers = newData
		},
		setPolyline: (state, newData) => {
			state.polyline = newData
		},
		setTotalDistance: (state, newData) => {
			state.totalDistance = newData
		},
		setLocationWatcherId: (state, newData) => {
			state.locationWatcherId = newData
		},
	},

	actions: {},
}

export default gps